<?php
/**
 * 课程报名
 * @copyright (c) Seer All Rights Reserved
 */

require_once './globals.php';

$Course_Student_Model = new Course_Student_Model();
$action = $_POST['action'];
$tel = isset($_REQUEST['tel']) ? $_REQUEST['tel'] : '';

//课程报名初期化
if ($action == '' ) {
	$pwd = '课程报名';
	include View::getView('header');
	require_once View::getView('course/signup');
	include View::getView('footer');
	View::output();
}

// 课程报名提交
if ($action == 'commit' ) {
	$student_id = $_POST['student_id'];
	$course_id = $_POST['course_id'];
	$Course_Student_Model->studentSign($student_id,$course_id);
	seerDirect("./signup.php?active_add=1");
}